'use strict';

const { testPermissions } = require('./test-permissions');

exports.main = async (event, context) => {
  try {
    // 运行权限测试
    await testPermissions();
    
    return {
      code: 200,
      message: '权限测试完成',
      data: null
    };
  } catch (error) {
    console.error('权限测试失败:', error);
    return {
      code: 500,
      message: '权限测试失败: ' + error.message,
      data: null
    };
  }
};